package com.wxzhou.wangzhuan.entity;

/**
 * 打款执行动作，最终执行动作，而不是放行动作
 */
public enum WithdrawTransAction {
    MANUAL(1, "手动到账"),
    AUTO(2, "自动到账");

    private final int code;
    private final String description;

    WithdrawTransAction(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static WithdrawTransAction fromCode(int code) {
        for (WithdrawTransAction status : values()) {
            if (status.code == code) {
                return status;
            }
        }
        throw new IllegalArgumentException("Unknown ad sense code: " + code);
    }

}
